"string_name = string_name[3..-1]" what could the follwoing line of ruby code mean?

Posted by Mo on Stack Overflow See other posts from Stack Overflow or by Mo
Published on 2010-05-07T15:08:11Z Indexed on 2010/05/07 15:08 UTC
Read the original article Hit count: 112

Filed under:
|

hi

im looking at some external code and saw a line of ruby code that looks like this

string_name = string_name[3..-1]

what does the [n..-x] do or mean?

thanks

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails